package com.kangkang.generic;

import java.util.List;

class Father {
}
class Son extends Father {
}
public class Test4 {
    public static void funA(Father a) {
    }
    public static void funB(Son b) {
        funA(b);
    }
    // 如下funD方法会报错
    public static void funC(List<? extends Father> listF) {
    }
    public static void funD(List<Son> listSon) {
        funC(listSon);
    }
    public static void funE(List<Father> listF2) {
        funC(listF2);
    }

}
